package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.GoodsSubscribeBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 订阅里程商品表 Mapper 接口
 * </p>
 *
 * @author xuelin yi
 * @since 2019-08-12
 */
public interface GoodsSubscribeMapper extends RootMapper<GoodsSubscribeBean> {

    /**
     * 根据商品id集合查询订阅商品信息
     * @param goodsIds
     * @return
     */
    List<GoodsSubscribeBean> getBatchIds(@Param("goodsIds") List<Integer> goodsIds);

    /**
     * 根据商品id查询订阅商品信息
     * @param goodsId
     * @return
     */
    @Override
    GoodsSubscribeBean getById(@Param("goodsId") Integer goodsId);

    /**
     * 新增订阅商品信息列表
     * @param goodsSubscribeBean
     * @return
     */
    @Override
    int create(GoodsSubscribeBean goodsSubscribeBean);
}
